/* 组件样式文件 */

/* 游戏状态组件样式 */
.game-status {
  width: 100%;
}

/* 角色信息样式 */
.character-info {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.character-info h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* 状态属性样式 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  padding: 0.8rem 1rem;
  background-color: rgba(10, 10, 26, 0.3);
  border-radius: 5px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
}

.stat-item:hover {
  background-color: rgba(10, 10, 26, 0.5);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}

.stat-label {
  color: var(--primary-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

.stat-value {
  color: var(--text-color);
  font-weight: 500;
}

/* 游戏消息样式 */
.game-message {
  background-color: rgba(10, 10, 26, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  min-height: 80px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* 操作按钮图标样式 */
.action-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* 操作按钮标签样式 */
.action-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.game-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* 按钮组样式 */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

/* 游戏操作组件样式 */
.game-actions {
  width: 100%;
  margin: 2rem 0;
  text-align: center;
}

.game-actions h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* 操作按钮网格样式 */
.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.action-button {
  font-family: inherit;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: var(--button-background);
  color: #0a0a1a;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.action-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: rotate(45deg);
  transition: transform 0.6s ease;
}

.action-button:hover::before {
  transform: rotate(45deg) translate(100%, 100%);
}

.action-button:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.action-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 开始游戏界面样式 */
.start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(45, 52, 54, 0.95), rgba(53, 59, 72, 0.95));
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* 欢迎消息样式 */
.welcome-message {
  text-align: center;
  margin-bottom: 20px;
}

.welcome-message h2 {
  color: #ffd700;
  font-size: 24px;
  margin-bottom: 10px;
  font-family: 'Ma Shan Zheng', cursive, sans-serif;
}

.welcome-message p {
  color: #f5f5f5;
  font-size: 16px;
}

.start-screen:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(212, 175, 55, 0.7);
}

/* 输入组样式 */
.input-group {
  margin-bottom: 2rem;
  width: 100%;
}

.input-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  color: var(--primary-color);
  text-align: left;
}

.input-group input {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: rgba(10, 10, 26, 0.5);
  color: var(--text-color);
  font-family: inherit;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  background-color: rgba(10, 10, 26, 0.7);
}

.input-group input::placeholder {
  color: rgba(240, 240, 240, 0.5);
}

/* 开始按钮样式 */
.start-button {
  font-family: inherit;
  padding: 1.2rem 2.5rem;
  font-size: 1.3rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: var(--button-background);
  color: #0a0a1a;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.start-button:hover {
  background: var(--button-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.start-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 游戏物品栏组件样式 */
.game-inventory {
  background-color: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
  max-height: 400px;
  overflow-y: auto;
}

/* 物品栏头部样式 */
.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.inventory-header h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 0;
}

/* 刷新按钮样式 */
.refresh-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.refresh-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.refresh-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* 物品栏错误样式 */
.inventory-error {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* 物品栏加载样式 */
.inventory-loading {
  text-align: center;
  padding: 2rem;
  color: var(--primary-color);
}

/* 物品栏内容样式 */
.inventory-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* 物品项样式 */
.inventory-item {
  background-color: rgba(10, 10, 26, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.inventory-item:hover {
  background-color: rgba(10, 10, 26, 0.9);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.inventory-item.selected {
  background-color: rgba(212, 175, 55, 0.1);
  border-color: var(--primary-color);
}

/* 物品图标样式 */
.item-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

/* 物品信息样式 */
.item-info {
  flex: 1;
}

.item-name {
  color: var(--primary-color);
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.item-type {
  color: rgba(240, 240, 240, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.item-description {
  color: var(--text-color);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.item-quantity {
  color: rgba(240, 240, 240, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.item-effect {
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 使用物品按钮样式 */
.use-item-button {
  background-color: var(--button-background);
  color: #0a0a1a;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.use-item-button:hover {
  background-color: var(--button-hover);
}

.use-item-button:disabled {
  background-color: rgba(212, 175, 55, 0.5);
  cursor: not-allowed;
}

/* 空物品栏样式 */
.inventory-empty {
  text-align: center;
  padding: 2rem;
  color: rgba(240, 240, 240, 0.7);
  grid-column: 1 / -1;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .stats, .action-buttons, .action-buttons-grid, .inventory-items {
    grid-template-columns: 1fr;
  }
  
  .character-info h2 {
    font-size: 1.8rem;
  }
  
  .game-message {
    font-size: 1rem;
    padding: 1.2rem;
  }
  
  .action-button {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
  }
  
  .start-button {
    font-size: 1.2rem;
    padding: 1rem 2rem;
  }
}